<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>注册-菜鸟毕设</title>
    <meta http-equiv="Cache-Control" content="no-transform"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta http-equiv="Cache-control" content="no-cache">
    <link rel="shortcut icon" th:href="@{/user/img/favicon.png}"/>
    <link rel="apple-touch-icon" th:href="@{/user/img/apple-touch-icon.png}"/>
    <style>
        #captcha{
            cursor: pointer;
        }
        #captcha:hover{
            border: 1px solid orange;
        }
    </style>
</head>
<body class="text-center">

<form class="form-signin" th:action="@{/register}" method="post">
    <img class="mb-4" th:src="@{/user/img/logo.png}" alt="" width="72" height="72">
    <h1 class="h3 mb-3 font-weight-normal">注册</h1>
    <p th:text="${registerMsg}" style="color: red"></p>

    <input type="text" name="username" class="form-control mb-2" placeholder="用户名" required="">
    <input type="password" id="password" name="password" class="form-control" placeholder="密码" required="">
    <input type="password" id="repassword" name="repassword" class="form-control" placeholder="确认密码" required="">
    <div>
        <img id="captcha" src="/captcha" height="48px" width="33%" style="float: left;"/>
        <input class="form-control" placeholder="请输入你的车牌号" style="display: inline-block;width:66%;" type="text"
               name="code" id="code"
               required="">
    </div>


    <button class="btn btn-lg btn-primary btn-block mt-3" type="submit">注 册</button>


    <p class="clearfix">
        <a id="tologin" href="javascript:;" class="float-right">已有账号？去登录</a>
    </p>

    <p class="mt-5 mb-3 text-muted">© 菜鸟毕设</p>
</form>

<link rel="stylesheet" th:href="@{/user/bootstrap/css/bootstrap.min.css}"/>
<link rel="stylesheet" th:href="@{/user/css/login.css}"/>
</body>
<script th:src="@{//cdn.staticfile.org/jquery/2.2.3/jquery.min.js}"></script>
<script>
    $('#captcha').click(function () {
        $(this).attr('src', '/captcha?date='+new Date());
    });
    $("#tologin").click(function () {
        window.location.href='/toLogin';
    })
</script>
</html>